;---------------------------------------------------------------------------
;Black Bomberman Stand Summon (Entrance)
[Statedef 7000]
type    = S
movetype= A
physics = N
velset = 5.02*const(size.xscale),0
ctrl = 0
anim = 7000
sprpriority = 3

[State 7000, 1]
type = ScreenBound
trigger1 = 1
value = 0

[State 7000, 2]
type = PlayerPush
trigger1 = 1
value = 0

[State 7000, 3]
type = Null
trigger1 = !Time
var(7) = -50-(50*(root,Var(0) > 0))

[State 7000, 4]
type = ParentVarSet
trigger1 = !Time && RoundState = 2
var(38) = 1

[State 7000, 5]
type = HitOverride
trigger1 = 1
attr = SCA,NA,SA,HA,NP,SP,HP
stateno = 7030
time = -1

[State 7000, 6]
type = HitBy
trigger1 = 1
value = SCA,NA,SA,HA,NP,SP,HP
time = -1

[State 7000, 7]
type = HitDef
trigger1 = !Time
attr = S,ST
hitflag = M
guardflag = MA
animtype = Medium
getpower = 0
priority = 3,Miss
damage = 0,20
guard.pausetime = 5,5
sparkno = -1
guard.sparkno = -1
sparkxy = -9,ceil(-13*const(size.xscale))
hitsound = F720,0
guardsound = F6,0
ground.type = Low
ground.slidetime = 10
ground.hittime = 10
ground.velocity = -3.8*const(size.xscale)
ground.cornerpush.veloff = 0
air.type = Low
air.hittime = 18
fall = 1
fall.recover = 0
fall.recovertime = 1
p1stateno = 7001
p2stateno = 7005
id = 1000
chainID = -1
nochainID = -1
hitonce = 0
kill = 1
guard.kill = 1
fall.kill = 1
numhits = 1

[State 7000, 8]
type = PlaySnd
trigger1 = !Time
value = S180,0 

[State 7000, 9]
type = HitBy
trigger1 = 1
value = SCA,NA,SA,HA,NP,SP,HP
time = -1

[State 7000, 10]
type = VarSet
trigger1 = 1
fvar(1) = P2BodyDist X 

[State 7000, 11]
type = VarSet
trigger1 = 1
fvar(2) = P2BodyDist Y 

[State 7000, 12]
type = ChangeState
trigger1 = FrontEdgeDist < -50
value = 7300
;---------------------------------------------------------------------------
;Black Bomberman Stand Summon (Grab)
[Statedef 7001]
type    = S
movetype= A
physics = N
velset = 0,0
ctrl = 0
anim = 7001
sprpriority = 3

[State 7001, 1]
type = ScreenBound
trigger1 = 1
value = 0

[State 7001, 2]
type = PlayerPush
trigger1 = 1
value = 0

[State 7001, 3]
type = HitOverride
trigger1 = 1
attr = SCA,NA,SA,HA,NP,SP,HP
stateno = 7030
time = -1

[State 7001, 4]
type = HitBy
trigger1 = 1
value = SCA,NA,SA,HA,NP,SP,HP
time = -1

[State 7001, 5]
type = Explod
trigger1 = AnimElem = 2
anim = 3052
ID = 7000
pos = ceil(10*const(size.xscale)),ceil(-12*const(size.yscale))
postype = p2  ;p2,front,back,left,right
facing = -1
vfacing = 1
bindtime = 1
removetime = -1
pausemovetime = 0
scale = const(size.xscale),const(size.yscale)
sprpriority = 2
ownpal = 1

[State 7001, 6]
type = ParentVarSet
trigger1 = !Time
var(5) = 10

[State 7000, 7]
type = VarSet
trigger1 = 1
fvar(1) = P2BodyDist X 

[State 7000, 8]
type = VarSet
trigger1 = 1
fvar(2) = P2BodyDist Y 

[State 7001, 9]
type = ChangeState
trigger1 = !AnimTime
value = 7002
;---------------------------------------------------------------------------
;Black Bomberman Stand Summon (Jump Back)
[Statedef 7002]
type    = S
movetype= A
physics = N
velset = -5.6*const(size.xscale),-3.7*const(size.yscale)
ctrl = 0
anim = 7002
sprpriority = 3

[State 7002, 1]
type = ScreenBound
trigger1 = 1
value = 0

[State 7002, 2]
type = PlayerPush
trigger1 = 1
value = 0

[State 7002, 3]
type = HitOverride
trigger1 = 1
attr = SCA,NA,SA,HA,NP,SP,HP
stateno = 7030
time = -1

[State 7002, 4]
type = VelAdd
trigger1 = 1
y = .44*const(size.yscale)

[State 7002, 5]
type = PlaySnd
trigger1 = !Time
value = S40,0 

[State 7000, 6]
type = VarSet
trigger1 = 1
fvar(1) = P2BodyDist X 

[State 7000, 7]
type = VarSet
trigger1 = 1
fvar(2) = P2BodyDist Y 

[State 7002, 8]
type = ChangeState
trigger1 = Vel Y > 0 && Pos Y > -Vel Y
value = 7003
;---------------------------------------------------------------------------
;Black Bomberman Stand Summon (bewm)
[Statedef 7003]
type    = S
movetype= A
physics = N
velset = 0,0
ctrl = 0
anim = 7003
sprpriority = 3

[State 7003, 1]
type = ScreenBound
trigger1 = 1
value = 0

[State 7003, 2]
type = PlayerPush
trigger1 = 1
value = 0

[State 7003, 3]
type = HitOverride
trigger1 = 1
attr = SCA,NA,SA,HA,NP,SP,HP
stateno = 7030
time = -1

[State 7003, 4]
type = HitBy
trigger1 = 1
value = SCA,NA,SA,HA,NP,SP,HP
time = -1

[State 7003, 5]
type = RemoveExplod
trigger1 = !Time
id = 7000

[State 7003, 6]
type = PosSet
trigger1 = !Time
y = 0

[State 7003, 7]
type = Explod
trigger1 = !Time 
anim = 1053
ID = 7001
pos = ceil(16*const(size.xscale)),ceil(-22*const(size.yscale))
postype = p2
facing = -1
vfacing = 1
bindtime = 1
removetime = -2
scale = const(size.xscale),const(size.yscale)
sprpriority = 2
ownpal = 1

[State 7003, 8]
type = TargetLifeAdd
trigger1 = !Time
value = ceil(-135*root,Fvar(21))

[State 7003, 9]
type = Null
triggerall = !Time
trigger1 = root,Cond(FVar(20) > .3, FVar(20) := FVar(20) - .2,0) || root,Cond(FVar(21) > .3, FVar(21) := FVar(21) - .2,0)
ignorehitpause = 1
persistent = 0

[State 7003, 10]
type = TargetState
trigger1 = NumTarget && !Time
value = 7006

[State 7003, 11]
type = PlaySnd
trigger1 = !Time
value = S190,0 

[State 7003, 12]
type = PlaySnd
trigger1 = !Time
value = F5,3 
channel = 3

[State 7003, 13]
type = VarSet
trigger1 = 1
fvar(1) = P2BodyDist X 

[State 7003, 14]
type = VarSet
trigger1 = 1
fvar(2) = P2BodyDist Y 

[State 7003, 15]
type = ChangeState
trigger1 = !AnimTime
value = 7020
;---------------------------------------------------------------------------
;Black Bomberman Stand Summon (Grab)
[Statedef 7005]
type    = S
movetype= H
physics = N
velset = 0,0
ctrl = 0
sprpriority = -2

[State 7005, 1]
type = ChangeAnim2
trigger1 = !Time
value = 7005

[State 7005, 2]
type = NotHitBy
trigger1 = 1
value = SCA,AA,AP,AT
time = 1
;---------------------------------------------------------------------------
;Black Bomberman Stand Summon (Grab)
[Statedef 7006]
type    = A
movetype= H
physics = N
velset = -6.4,-4.2
ctrl = 0
sprpriority = -2

[State 7006, 1]
type = ChangeAnim2
trigger1 = !Time
value = 25420

[State 7006, 2]
type = NotHitBy
trigger1 = 1
value = SCA,AA,AP,AT
time = 1

[State 7006, 3]
type = VelAdd
trigger1 = 1
y = .35*const(size.yscale)

[State 7006, 4]
type = PosSet
trigger1 = Pos Y > -Vel Y
y = 0

[State 7006, 5]
type = SelfState
trigger1 = Vel Y > 0 && Pos Y > -Vel Y
value = 5100
;---------------------------------------------------------------------------
;Black Bomberman 
[Statedef 7010]
type    = S
movetype= I
physics = N
velset = 5.02*const(size.xscale),0
ctrl = 0
anim = 7000
sprpriority = 3

[State 7010, 1]
type = ScreenBound
trigger1 = 1
value = 0

[State 7010, 2]
type = PlayerPush
trigger1 = 1
value = 0

[State 7010, 3]
type = Null
trigger1 = !Time
var(7) = -50-(50*(root,Var(0) > 0))

[State 7010, 4]
type = ParentVarSet
trigger1 = !Time && RoundState = 2
var(38) = 1

[State 7010, 5]
type = HitOverride
trigger1 = 1
attr = SCA,NA,SA,HA,NP,SP,HP
stateno = 7030
time = -1

[State 7010, 6]
type = HitBy
trigger1 = 1
value = SCA,NA,SA,HA,NP,SP,HP
time = -1

[State 7000, 7]
type = VarSet
trigger1 = 1
fvar(1) = P2BodyDist X 

[State 7000, 8]
type = VarSet
trigger1 = 1
fvar(2) = P2BodyDist Y 

[State 7010, 9]
type = PlaySnd
trigger1 = !Time
value = S180,0 

[State 7010, 10]
type = ChangeState
trigger1 = BackEdgeDist >= 65
value = 7011
;---------------------------------------------------------------------------
;Black Bomberman 
[Statedef 7011]
type    = S
movetype= I
physics = N
velset = 0,0
ctrl = 0
anim = 7011
sprpriority = 3

[State 7011, 1]
type = ScreenBound
trigger1 = 1
value = 0

[State 7011, 2]
type = PlayerPush
trigger1 = 1
value = 0

[State 7011, 3]
type = HitOverride
trigger1 = 1
attr = SCA,NA,SA,HA,NP,SP,HP
stateno = 7030
time = -1

[State 7011, 4]
type = HitBy
trigger1 = 1
value = SCA,NA,SA,HA,NP,SP,HP
time = -1

[State 7011, 5]
type = Helper
trigger1 = AnimElem = 4
name = "Bomb"
ID = 7050
stateno = 7012
pos = ceil(14*const(size.xscale)),0
postype = p1
facing = 1
keyctrl = 0
ownpal = 1
supermovetime = 0
pausemovetime = 0
size.xscale = const(size.xscale)
size.yscale = const(size.yscale)

[State 7011, 6]
type = ParentVarSet
trigger1 = AnimElem = 4
var(39) = 1

[State 7011, 7]
type = VarAdd
trigger1 = AnimElem = 4
var(11) = 1

[State 7011, 7]
type = StateTypeSet
trigger1 = Time = 28
movetype = A

[State 7011, 8]
type = StateTypeSet
trigger1 = Time = 30
movetype = A

[State 7011, 9]
type = Explod
trigger1 = AnimElem = 7
anim = 6000
ID = 7010
pos = ceil(23*const(size.xscale)),ceil(-14*const(size.yscale))
postype = p1
removetime = -2
scale = const(size.xscale),const(size.yscale)
sprpriority = 5
ownpal = 1

[State 7011, 10]
type = VarSet
trigger1 = 1
fvar(1) = P2BodyDist X 

[State 7011, 11]
type = VarSet
trigger1 = 1
fvar(2) = P2BodyDist Y 

[State 7011, 12]
type = PlaySnd
trigger1 = AnimElem = 3
value = S180,0

[State 7011, 13]
type = PlaySnd
trigger1 = AnimElem = 7
value = F0,2

[State 7011, 14]
type = PlaySnd
trigger1 = AnimElem = 7
value = F5,1

[State 7011, 15]
type = ChangeState
trigger1 = !AnimTime
value = 7020
;---------------------------------------------------------------------------
;Black Bomberman 
[Statedef 7012]
type    = S
movetype= I
physics = N
velset = 0,0
ctrl = 0
anim = 1001
sprpriority = 4

[State 1002, 1]
type = ChangeState
triggerall = parent,Anim = 7011
trigger1 = parent,AnimElem = 7
value = 7013

[State 1002, 2]
type = ChangeState
trigger1 = Time = 132
value = 7016
;---------------------------------------------------------------------------
;Black Bomberman 
[Statedef 7013]
type    = A
movetype= A
physics = N
velset = 6.7*const(size.xscale),-5.1*const(size.yscale)
ctrl = 0
anim = 7013
sprpriority = 4

[State 7013, 1]
type = ScreenBound
trigger1 = 1
value = 0

[State 7013, 2]
type = PlayerPush
trigger1 = 1
value = 0

[State 7013, 3]
type = HitOverride
trigger1 = 1
attr = SCA,NA,SA,HA,NP,SP,HP
stateno = 7014
time = -1

[State 7013, 4]
type = HitBy
trigger1 = 1
value = SCA,NA,SA,HA,NP,SP,HP
time = -1

[State 7013, 5]
type = VarSet
trigger1 = !Time
fvar(3) = root,FVar(21)

[State 7013, 6]
type = HitDef
trigger1 = !Time
attr = S, SP
damage = ceil(10*FVar(3)),10
animtype = Hard
getpower = 0
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 5,5
sparkno = -1
hitsound = F5,1
guardsound = F6,0
ground.type = High
ground.slidetime = 15
ground.hittime  = 24
ground.velocity = -1*const(size.xscale)
ground.cornerpush.veloff = 0
air.type = Low
air.velocity = -0.6*const(size.xscale),-1.35*const(size.yscale)
yaccel = .35*const(size.yscale)
air.hittime = 15
fall = 1
fall.recover = 0
id = 7010
chainID = -1
nochainID = -1
hitonce = 0
kill = 1
guard.kill = 1
fall.kill = 1
numhits = 1

[State 7013, 7]
type = Null
triggerall = NumTarget && MoveHit && HitPauseTime = 1 && HitCount = 1
trigger1 = root,Cond(FVar(20) > .3, FVar(20) := FVar(20) - .2,0) || root,Cond(FVar(21) > .3, FVar(21) := FVar(21) - .2,0)
ignorehitpause = 1
persistent = 0

[State 7013, 8]
type = VelAdd
trigger1 = 1
y = .44*const(size.yscale)

[State 7013, 9]
type = PalFX
trigger1 = (GameTime % 2) = 0
time = 1
add = 181,49,32
ignorehitpause = 1

[State 7013, 10]
type = ChangeState
trigger1 = MoveContact
trigger2 = Vel Y > 0 && Pos Y > -Vel Y
value = 7014
;---------------------------------------------------------------------------
;Black Bomberman 
[Statedef 7014]
type    = A
movetype= A
physics = N
velset = 0,0
ctrl = 0
anim = 1053
sprpriority = 4
hitcountpersist = 1

[State 7014, 1]
type = ScreenBound
trigger1 = 1
value = 0

[State 7014, 2]
type = PlayerPush
trigger1 = 1
value = 0

[State 7014, 3]
type = HitOverride
trigger1 = 1
attr = SCA,NA,SA,HA,NP,SP,HP
stateno = 7014
time = -1

[State 7014, 4]
type = HitBy
trigger1 = 1
value = SCA,NA,SA,HA,NP,SP,HP
time = -1

[State 7014, 5]
type = HitDef
trigger1 = !Time
attr = S, SP
damage = ceil(90*FVar(3)),5
getpower = 0
animtype = Hard
guardflag = MA
hitflag = MAF
priority = 4, Hit
pausetime = 1,1
sparkno = -1
hitsound = F5,3
guardsound = F6,0
ground.type = High
ground.slidetime = 11
ground.hittime  = 22
guard.hittime = 11
ground.velocity = -4.6*const(size.xscale),-4.2*const(size.yscale)
ground.cornerpush.veloff = 0
air.type = Low
air.velocity = -4.1*const(size.xscale),-3.8*const(size.yscale)
yaccel = .35*const(size.yscale)
air.hittime = 15
fall = 1
fall.recover = 0
id = 1000
chainID = -1
nochainID = -1
hitonce = 0
kill = 1
guard.kill = 1
fall.kill = 1
numhits = 1

[State 7014, 6]
type = Null
triggerall = NumTarget && MoveHit && HitPauseTime = 1 && HitCount = 1
trigger1 = root,Cond(FVar(20) > .3, FVar(20) := FVar(20) - .2,0) || root,Cond(FVar(21) > .3, FVar(21) := FVar(21) - .2,0)
ignorehitpause = 1
persistent = 0

[State 7014, 7]
type = PosSet
trigger1 = Pos Y > -Vel Y 
y = 0

[State 7014, 8]
type = ChangeAnim
triggerall = Anim != 902
trigger1 = Pos Y >= 0 
value = 902

[State 7014, 9]
type = PlaySnd
trigger1 = !Time
value = S190,0

[State 7014, 10]
type = TargetState
triggerall = NumTarget && MoveHit
trigger1 = HitPauseTime = 1
value = 5400
ID = -1
ignorehitpause = 1

[State 7014, 11]
type = ChangeState
trigger1 = !AnimTime
value = 7015
;-------------------------------------------------------------------------
;Bomb Gone
[Statedef 7015]
type    = S
movetype= A
physics = N
ctrl = 0
velset = 0,0
anim = 1

[State 7015, 1]
type = ParentVarAdd
trigger1 = !Time
var(10) = 1

[State 7015, 2]
type = DestroySelf
triggerall = Time
trigger1 = !NumTarget && Anim = 1
trigger2 = NumTarget && Anim = 1
trigger2 = target,StateType = L
;---------------------------------------------------------------------------
;Bomb Lay
[Statedef 7016]
type    = S
movetype= A
physics = N
velset = 0,0
anim = 902
ctrl = 0
sprpriority = 3

[State 7016, 1]
type = HitDef
triggerall = !NumTarget
trigger1 = !Time
attr = S, HP
damage = ceil(100*root,Fvar(21)),25
animtype = Hard
getpower = 0,0
guardflag = MAF
hitflag = MAF
priority = 4, Hit
pausetime = 1,1
sparkno = -1
hitsound = F5,3
guardsound = F6, 0
ground.type = Low
ground.slidetime = 11
ground.hittime  = 22
guard.hittime = 11
ground.velocity = -0.5*const(size.xscale),-9.7*const(size.yscale)
guard.velocity = -4.7
ground.cornerpush.veloff = 0
air.type = Low
air.velocity = -0.5*const(size.xscale),-7.5*const(size.yscale)
yaccel = .35*const(size.yscale)
air.hittime = 100
fall = 1
fall.recover = 0
id = 1000
chainID = -1
nochainID = -1
hitonce = 0
kill = 1
guard.kill = 1
fall.kill = 1
numhits = 1

[State 7016, 2]
type = Null
triggerall = NumTarget && MoveHit && HitPauseTime = 1 && HitCount = 1
trigger1 = root,Cond(FVar(20) > .3, FVar(20) := FVar(20) - .2,0) || root,Cond(FVar(21) > .3, FVar(21) := FVar(21) - .2,0)
ignorehitpause = 1
persistent = 0

[State 7016, 3]
type = TargetState
triggerall = NumTarget && MoveHit
trigger1 = HitPauseTime = 1
value = 5400
ID = -1
ignorehitpause = 1

[State 7016, 4]
type = PlaySnd
trigger1 = !Time
value = S190,0

[State 7016, 5]
type = ChangeState
trigger1 = !AnimTime
value = 7015
ignorehitpause = 1
;---------------------------------------------------------------------------
;Helper1 Leave
[Statedef 7020]
type    = S
movetype= I
physics = N
ctrl = 0
velset = -5.02*const(size.xscale), 0
anim = 7020
sprpriority = 3

[State 7020, 1]
type = ScreenBound
trigger1 = 1
value = 0

[State 7020, 2]
type = PlayerPush
trigger1 = 1
value = 0

[State 7020, 3]
type = ChangeState
trigger1 = BackEdgeDist < -50
value = 7300
;---------------------------------------------------------------------------
; HITA_UP (initial going up)
[Statedef 7030]
type    = A
movetype= H
physics = N
velset = -1*abs(GetHitVar(xvel)), -4.5*const(size.yscale)
ctrl = 0
anim = 7030
sprpriority = 3

[State 7030, 1]
type = ParentVarAdd
trigger1 = !Time 
var(6) = -100
ignorehitpause = 1

[State 7030, 2]
type = VelAdd
trigger1 = 1
y = .44*const(size.yscale)

[State 7030, 3]
type = ChangeState
trigger1 = Vel Y > 0 && Pos Y > -Vel Y
value = 7031

[State 7030, 4]
type = ChangeState
triggerall = !Time
trigger1 = root,Var(6) = 0
value = 7040
;---------------------------------------------------------------------------
; HITA_UP (initial going up)
[Statedef 7031]
type    = A
movetype= H
physics = N
velset = 0,0
ctrl = 0
anim = 7031
sprpriority = 3

[State 7031, 1]
type = PosSet
trigger1 = !Time
y = 0

[State 7030, 2]
type = ChangeState
trigger1 = !AnimTime
value = 7020
;---------------------------------------------------------------------------
;Helper1 Defeated
[Statedef 7040]
type    = L
movetype= H
physics = N
sprpriority = 3
velset = 0,0
anim = 7040
ctrl = 0

[State 7040, 1]
type = PlaySnd
trigger1 = !Time
value = S11,1

[State 7040, 2]
type = DestroySelf
trigger1 = !AnimTime
;---------------------------------------------------------------------------
;Lode Runner Stand Summon (Entrance)
[Statedef 7100]
type    = S
movetype= I
physics = N
velset = 5.5*const(size.xscale),0
ctrl = 0
anim = 7100
sprpriority = 3

[State 7100, 1]
type = ScreenBound
trigger1 = 1
value = 0

[State 7100, 2]
type = PlayerPush
trigger1 = 1
value = 0

[State 7100, 3]
type = Null
trigger1 = !Time
var(7) = -100-(50*(root,Var(0) > 0))

[State 7100, 4]
type = ParentVarSet
trigger1 = !Time && RoundState = 2
var(38) = 1

[State 7100, 4]
type = HitOverride
trigger1 = 1
attr = SCA,NA,SA,HA,NP,SP,HP
stateno = 7130
time = -1

[State 7100, 5]
type = HitBy
trigger1 = 1
value = SCA,NA,SA,HA,NP,SP,HP
time = -1

[State 7100, 6]
type = PlaySnd
trigger1 = AnimElem = 4
value = S7100,((var(1) % 2))

[State 7100, 7]
type = VarSet
trigger1 = !Time
var(1) = 0

[State 7100, 8]
type = VarAdd
trigger1 = AnimElem = 4
var(1) = 1

[State 7100, 9]
type = VarSet
trigger1 = 1
fvar(1) = P2BodyDist X 

[State 7100, 10]
type = VarSet
trigger1 = 1
fvar(2) = P2BodyDist Y 

[State 7100, 11]
type = ChangeState
trigger1 = (Facing = 1 && Pos X > -40 ) || (Facing = -1 && Pos X < 40)
value = 7101
;---------------------------------------------------------------------------
;Lode Runner Stand Summon (Shoot)
[Statedef 7101]
type    = S
movetype= I
physics = N
velset = 0,0
ctrl = 0
anim = 7101
sprpriority = 3

[State 7101, 1]
type = ScreenBound
trigger1 = 1
value = 0

[State 7101, 2]
type = PlayerPush
trigger1 = 1
value = 0

[State 7101, 3]
type = HitOverride
trigger1 = 1
attr = SCA,NA,SA,HA,NP,SP,HP
stateno = 7130
time = -1

[State 7101, 4]
type = HitBy
trigger1 = 1
value = SCA,NA,SA,HA,NP,SP,HP
time = -1

[State 7101, 5]
type = Helper
trigger1 = Time = 14
name = "Pit"
ID = 7100
stateno = 7103
pos = ceil(40*const(size.xscale)),0
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 1
size.xscale = const(size.xscale)
size.yscale = const(size.yscale)

[State 7101, 6]
type = Explod
trigger1 = Time = 14 
anim = 7109
ID = 7100
pos = ceil(10*const(size.xscale)),ceil(-1*const(size.yscale))
postype = p1
facing = 1
vfacing = 1
bindtime = 1
removetime = -2
scale = const(size.xscale),const(size.yscale)
sprpriority = 4
ownpal = 1
removeongethit = 1

[State 7101, 7]
type = ParentVarSet
trigger1 = Time = 14
var(39) = 1

[State 7011, 8]
type = VarAdd
trigger1 = Time = 14
var(11) = 1

[State 7101, 9]
type = VarSet
trigger1 = 1
fvar(1) = P2BodyDist X 

[State 7101, 10]
type = VarSet
trigger1 = 1
fvar(2) = P2BodyDist Y 

[State 7101, 11]
type = PlaySnd
trigger1 = Time = 14
value = S7100,2

[State 7101, 12]
type = ChangeState
triggerall = NumHelper(7100)
trigger1 = helper(7100), Anim = 7103 && helper(7100), AnimElem = 5
value = 7102
;---------------------------------------------------------------------------
;Lode Runner Stand Summon (Shoot)
[Statedef 7102]
type    = S
movetype= I
physics = N
velset = 0,0
ctrl = 0
anim = 7102
sprpriority = 3

[State 7101, 1]
type = ScreenBound
trigger1 = 1
value = 0

[State 7101, 2]
type = PlayerPush
trigger1 = 1
value = 0

[State 7101, 3]
type = HitOverride
trigger1 = 1
attr = SCA,NA,SA,HA,NP,SP,HP
stateno = 7130
time = -1

[State 7101, 4]
type = HitBy
trigger1 = 1
value = SCA,NA,SA,HA,NP,SP,HP
time = -1

[State 7101, 5]
type = VarSet
trigger1 = 1
fvar(1) = P2BodyDist X 

[State 7101, 6]
type = VarSet
trigger1 = 1
fvar(2) = P2BodyDist Y 

[State 7101, 7]
type = ChangeState
trigger1 = !AnimTime
value = 7120
;---------------------------------------------------------------------------
;Pit
[Statedef 7103]
type    = S
movetype= A
physics = N
velset = 0,0
ctrl = 0
anim = 7103
sprpriority = 3

[State 7103, 1]
type = ScreenBound
trigger1 = 1
value = 0

[State 7103, 2]
type = PlayerPush
trigger1 = 1
value = 0

[State 7103, 3]
type = HitDef
trigger1 = AnimElem = 2
attr = S,ST
hitflag = MAF
animtype = Light
priority = 4,Hit
damage = 0,0
pausetime = 1,1
sparkno = -1
hitsound = S7110,2
guardsound = -1
p2stateno = 7105
id = 7100
chainID = -1
nochainID = -1
hitonce = 0
kill = 1
guard.kill = 1
fall.kill = 1
numhits = 1

[State 7013, 4]
type = Null
triggerall = NumTarget && MoveHit && HitPauseTime = 1 && HitCount = 1
trigger1 = root,Cond(FVar(20) > .3, FVar(20) := FVar(20) - .2,0) || root,Cond(FVar(21) > .3, FVar(21) := FVar(21) - .2,0)
ignorehitpause = 1
persistent = 0

[State 7103, 5]
type = TargetState
trigger1 = NumTarget && Time = 120
value = 7107

[State 7103, 6]
type = ChangeState
trigger1 = parent,StateNo = 7130 && Time < 12
trigger2 = !NumTarget && Time = 80 
trigger3 = NumTarget
trigger3 = target,StateNo = 7107
value = 7104
;---------------------------------------------------------------------------
;Pit Exit
[Statedef 7104]
type    = S
movetype= A
physics = N
velset = 0,0
ctrl = 0
anim = 7104
sprpriority = 3

[State 7104, 1]
type = ScreenBound
trigger1 = 1
value = 0

[State 7104, 2]
type = PlayerPush
trigger1 = 1
value = 0

[State 7104, 3]
type = ChangeState
trigger1 = !AnimTime
value = 7015
;---------------------------------------------------------------------------
;Player Fall
[Statedef 7105]
type    = U
movetype= H
physics = N
velset = 0,0
ctrl = 0
sprpriority = 3

[State 7105, 1]
type = ScreenBound
trigger1 = 1
value = 0

[State 7105, 2]
type = NotHitBy
trigger1 = 1
value = SCA,AA,AP,AT
time = 1

[State 7105, 3]
type = StateTypeSet
trigger1 = StateType != A
statetype = A 

[State 7105, 4]
type = PosSet
trigger1 = Time = 1
y = 3

[State 7105, 5]
type = ChangeAnim
trigger1 = StateType != A && !Time
value = 46

[State 7105, 6]
type = ChangeState
trigger1 = Time = 2
value = 7106
;---------------------------------------------------------------------------
;Player Trapped
[Statedef 7106]
type    = A
movetype= H
physics = N
ctrl = 0
velset = 0,0
sprpriority = 3

[State 7106, 1]
type = ScreenBound
trigger1 = 1
value = 0

[State 7106, 2]
type = NotHitBy
trigger1 = 1
value = SCA,AA,AP,AT
time = 1

[State 7106, 3]
type = AssertSpecial
trigger1 = 1
flag = invisible

[State 7106, 4]
type = PosSet
trigger1 = !Time
y = -450
;---------------------------------------------------------------------------
;Player Trapped
[Statedef 7107]
type    = A
movetype= H
physics = N
ctrl = 0
velset = 0,4.5
sprpriority = 3

[State 7107, 1]
type = ScreenBound
trigger1 = 1
value = 0

[State 7107, 2]
type = ChangeAnim
trigger1 = !Time
value = 5050

[State 7107, 3]
type = VelAdd
trigger1 = 1
y = .35*const(size.yscale)

[State 7107, 4]
type = LifeAdd
trigger1 = Vel Y > 0 && Pos Y > -Vel Y
value = -85

[State 7107, 5]
type = SelfState
trigger1 = Vel Y > 0 && Pos Y > -Vel Y
value = 5100
;---------------------------------------------------------------------------
;Lode Runner Stand Summon (Entrance)
[Statedef 7110]
type    = A
movetype= I
physics = N
velset = 3.75*const(size.xscale),0
ctrl = 0
anim = 7110
sprpriority = 3

[State 7110, 1]
type = ScreenBound
trigger1 = 1
value = 0

[State 7110, 2]
type = PlayerPush
trigger1 = 1
value = 0

[State 7000, 3]
type = Null
trigger1 = !Time
var(7) = -50-(50*(root,Var(0) > 0))

[State 7010, 4]
type = ParentVarSet
trigger1 = !Time
var(38) = 1

[State 7110, 5]
type = HitOverride
trigger1 = 1
attr = SCA,NA,SA,HA,NP,SP,HP
stateno = 7130
time = -1

[State 7110, 6]
type = HitBy
trigger1 = 1
value = SCA,NA,SA,HA,NP,SP,HP
time = -1

[State 7110, 7]
type = PlaySnd
trigger1 = AnimElem = 4
value = S7110,((var(1) % 2))

[State 7110, 8]
type = VarSet
trigger1 = !Time
var(1) = 0

[State 7110, 9]
type = VarAdd
trigger1 = AnimElem = 4
var(1) = 1

[State 7110, 10]
type = PosSet
trigger1 = !Time
y = (-ScreenPos Y) + 36

[State 7110, 11]
type = VarSet
trigger1 = 1
fvar(1) = P2BodyDist X 

[State 7110, 12]
type = VarSet
trigger1 = 1
fvar(2) = P2BodyDist Y 

[State 7110, 13]
type = ChangeState
trigger1 = P2Dist X < 0
value = 7111
;---------------------------------------------------------------------------
;Lode Runner Stand Summon (Entrance)
[Statedef 7111]
type    = A
movetype= A
physics = N
velset = 0,0
ctrl = 0
anim = 7111
sprpriority = 3

[State 7111, 1]
type = ScreenBound
trigger1 = 1
value = 0

[State 7111, 2]
type = PlayerPush
trigger1 = 1
value = 0

[State 7111, 3]
type = HitOverride
trigger1 = 1
attr = SCA,NA,SA,HA,NP,SP,HP
stateno = 7130
time = -1

[State 7111, 4]
type = HitBy
trigger1 = 1
value = SCA,NA,SA,HA,NP,SP,HP
time = -1

[State 7111, 5]
type = PosAdd
trigger1 = AnimElem = 2
x = -16
y = 10

[State 7111, 6]
type = PosAdd
trigger1 = AnimElem = 3
y = 4

[State 7111, 7]
type = VelAdd
trigger1 = 1
y = .5

[State 7113, 8]
type = HitDef
trigger1 = AnimElem = 5
attr = A, SA
damage = ceil(130*root,Fvar(21)),15
animtype = Hard
guardflag = MAF
hitflag = MAF
priority = 4, Hit
getpower = 0
pausetime = 1,1
sparkno = S6001
sparkxy = -11,0
hitsound = F5, 4
guardsound = F6, 0
ground.type = High
ground.slidetime = 13
ground.hittime  = 16
guard.slidetime = 13
guard.hittime = 13
ground.velocity = 0,25*const(size.yscale)
air.type = High
air.velocity = 0,25*const(size.yscale)
yaccel = .35*const(size.yscale)
air.hittime = 15
fall = 1
fall.recover = 0
kill = 1
guard.kill = 1
fall.kill = 1
numhits = 1
id = 7210
chainID = -1
nochainID = -1
hitonce = 0
kill = 1
guard.kill = 1
fall.kill = 1
numhits = 1

[State 7113, 9]
type = Null
triggerall = NumTarget && MoveHit
trigger1 = root,Cond(FVar(20) > .3, FVar(20) := FVar(20) - .2,0) || root,Cond(FVar(21) > .3, FVar(21) := FVar(21) - .2,0)
ignorehitpause = 1
persistent = 0

[State 7113, 10]
type = VarSet
trigger1 = 1
fvar(1) = P2BodyDist X 

[State 7113, 11]
type = VarSet
trigger1 = 1
fvar(2) = P2BodyDist Y 

[State 7113, 12]
type = PlaySnd
trigger1 = AnimElem = 4
value = S7110,2
channel = 3

[State 7113, 13]
type = ChangeState
trigger1 = Vel Y > 0 && Pos Y > -Vel Y
value = 7112

;---------------------------------------------------------------------------
;Lode Runner Stand Summon (Land)
[Statedef 7112]
type    = A
movetype= A
physics = N
velset = 0,0
ctrl = 0
anim = 7112
sprpriority = 3

[State 7112, 1]
type = ScreenBound
trigger1 = 1
value = 0

[State 7112, 2]
type = PlayerPush
trigger1 = 1
value = 0

[State 7112, 3]
type = HitOverride
trigger1 = 1
attr = SCA,NA,SA,HA,NP,SP,HP
stateno = 7130
time = -1

[State 7112, 4]
type = HitBy
trigger1 = 1
value = SCA,NA,SA,HA,NP,SP,HP
time = -1

[State 7112, 5]
type = StopSnd
trigger1 = !Time
channel = 3

[State 7112, 6]
type = PosSet
trigger1 = !Time
y = 0

[State 7112, 7]
type = VarSet
trigger1 = 1
fvar(1) = P2BodyDist X 

[State 7112, 8]
type = VarSet
trigger1 = 1
fvar(2) = P2BodyDist Y 

[State 7112, 9]
type = ChangeState
trigger1 = !AnimTime
value = 7120
;---------------------------------------------------------------------------
;Lode Runner Leave
[Statedef 7120]
type    = S
movetype= I
physics = N
velset = -5.5*const(size.xscale),0
ctrl = 0
anim = 7120
sprpriority = 3

[State 7120, 1]
type = ScreenBound
trigger1 = 1
value = 0

[State 7120, 2]
type = PlayerPush
trigger1 = 1
value = 0

[State 7120, 3]
type = NotHitBy
trigger1 = 1
value = SCA,NA,SA,HA,NP,SP,HP
time = -1

[State 7120, 4]
type = PlaySnd
trigger1 = AnimElem = 4
value = S7100,((var(1) % 2))

[State 7120, 6]
type = VarAdd
trigger1 = AnimElem = 4
var(1) = 1

[State 7120, 7]
type = ChangeState
trigger1 = BackEdgeDist < -50
value = 7300
;---------------------------------------------------------------------------
; HITA_UP (initial going up)
[Statedef 7130]
type    = A
movetype= H
physics = N
velset = 0,-7.8*const(size.yscale)
ctrl = 0
anim = 7130
sprpriority = 3

[State 7130, 1]
type = ScreenBound
trigger1 = 1
value = 0

[State 7130, 2]
type = PlayerPush
trigger1 = 1
value = 0

[State 7130, 3]
type = ParentVarAdd
trigger1 = !Time 
var(6) = -100
ignorehitpause = 1

[State 7130, 2]
type = VelAdd
trigger1 = 1
y = .44*const(size.yscale)

[State 7130, 3]
type = ChangeState
triggerall = root,Var(6)
trigger1 = Vel Y > 0 && Pos Y > -Vel Y
value = 7131

[State 7130, 4]
type = ChangeState
trigger1 = root,Var(6) = 0
value = 7140
;---------------------------------------------------------------------------
; HITA_UP (initial going up)
[Statedef 7131]
type    = A
movetype= H
physics = N
velset = 0,0
ctrl = 0
anim = 7112
sprpriority = 3

[State 7131, 1]
type = ScreenBound
trigger1 = 1
value = 0

[State 7131, 2]
type = PlayerPush
trigger1 = 1
value = 0

[State 7131, 3]
type = PosSet
trigger1 = !Time
y = 0

[State 7131, 4]
type = NotHitBy
trigger1 = 1
value = SCA,AA,AP,AT
time = 1

[State 7131, 5]
type = ChangeState
trigger1 = !AnimTime
value = 7120
;---------------------------------------------------------------------------
;Lode Runner Defeated
[Statedef 7140]
type    = L
movetype= H
physics = N
velset = 0,0
ctrl = 0
anim = 7140
sprpriority = 3

[State 7140, 1]
type = ScreenBound
trigger1 = 1
value = 0

[State 7140, 2]
type = PlayerPush
trigger1 = 1
value = 0

[State 7140, 3]
type = PlaySnd
trigger1 = !Time
value = S7140,0

[State 7140, 4]
type = DestroySelf
trigger1 = !AnimTime
;---------------------------------------------------------------------------
;Challenger Stand Summon (Entrance)
[Statedef 7200]
type    = A
movetype= I
physics = N
velset = ifelse(parent,FrontEdgeDist > 30,(ParentDist X + 20)/15,(ParentDist X)/15),-3.33*const(size.yscale)
ctrl = 0
anim = 7200
sprpriority = 3

[State 7200, 1]
type = ScreenBound
trigger1 = 1
value = 0

[State 7200, 2]
type = PlayerPush
trigger1 = 1
value = 0

[State 7200, 3]
type = Null
trigger1 = !Time
var(7) = -50-(50*(root,Var(0) > 0))

[State 7200, 4]
type = ParentVarSet
trigger1 = !Time && RoundState = 2
var(38) = 1

[State 7200, 5]
type = HitOverride
trigger1 = 1
attr = SCA,NA,SA,HA,NP,SP,HP
stateno = 7230
time = -1

[State 7200, 6]
type = HitBy
trigger1 = 1
value = SCA,NA,SA,HA,NP,SP,HP
time = -1

[State 7200, 7]
type = VelAdd
trigger1 = 1
y = .44*const(size.yscale)

[State 7000, 8]
type = VarSet
trigger1 = 1
fvar(1) = P2BodyDist X 

[State 7000, 9]
type = VarSet
trigger1 = 1
fvar(2) = P2BodyDist Y 

[State 7200, 10]
type = PlaySnd
trigger1 = !Time
value = S7200,0

[State 7200, 11]
type = ChangeState
trigger1 = Vel Y > 0 && Pos Y > -Vel Y
value = 7201
;---------------------------------------------------------------------------
;Challenger Stand Summon (Knife Toss)
[Statedef 7201]
type    = S
movetype= I
physics = N
velset = 0,0
ctrl = 0
anim = 7201
sprpriority = 3

[State 7201, 1]
type = ScreenBound
trigger1 = 1
value = 0

[State 7201, 2]
type = PlayerPush
trigger1 = 1
value = 0

[State 7201, 3]
type = HitOverride
trigger1 = 1
attr = SCA,NA,SA,HA,NP,SP,HP
stateno = 7230
time = -1

[State 7201, 4]
type = HitBy
trigger1 = 1
value = SCA,NA,SA,HA,NP,SP,HP
time = -1

[State 7201, 5]
type = Helper
trigger1 = AnimElem = 4
name = "Knife"
ID = 7050
stateno = 7202
pos = ceil(40*const(size.xscale)),ceil(-32*const(size.yscale))
postype = p1    ;p2,front,back,left,right
facing = 1
keyctrl = 0
ownpal = 1
size.xscale = const(size.xscale)
size.yscale = const(size.yscale)

[State 7201, 6]
type = ParentVarSet
trigger1 = AnimElem = 4
var(39) = 1

[State 7201, 7]
type = VarSet
trigger1 = AnimElem = 4
var(11) = 1

[State 7201, 8]
type = PosSet
trigger1 = !Time
y = 0

[State 7201, 9]
type = PlaySnd
trigger1 = AnimElem = 2
value = S7200,1

[State 7000, 10]
type = VarSet
trigger1 = 1
fvar(1) = P2BodyDist X 

[State 7000, 11]
type = VarSet
trigger1 = 1
fvar(2) = P2BodyDist Y 

[State 7201, 12]
type = ChangeState
trigger1 = !AnimTime
value = 7220
ctrl = 0
;---------------------------------------------------------------------------
;Knife
[Statedef 7202]
type    = S
movetype= A
physics = N
velset = 8.13*const(size.xscale),0
ctrl = 0
anim = 7202
sprpriority = 3

[State 7202, 1]
type = ScreenBound
trigger1 = 1
value = 0

[State 7202, 2]
type = PlayerPush
trigger1 = 1
value = 0

[State 7202, 3]
type = HitOverride
trigger1 = 1
attr = SCA,AP
stateno = 7015
time = -1

[State 7202, 4]
type = HitBy
trigger1 = 1
value = SCA,AP
time = -1

[State 7202, 5]
type = HitDef
trigger1 = !Time
attr = S, SP
damage = ceil(100*root,Fvar(21)),10
animtype = Hard
guardflag = MAF
hitflag = MAF
priority = 4, Hit
getpower = 0
pausetime = 1,1
sparkno = S6001
sparkxy = -11,0
hitsound = F5, 2
guardsound = F6, 0
ground.type = High
ground.slidetime = 15
ground.hittime  = 24
ground.velocity = -4*const(size.xscale)
ground.cornerpush.veloff = 0
air.type = Low
air.velocity = -2.1*const(size.xscale),-2.3*const(size.yscale)
yaccel = .35*const(size.yscale)
air.hittime = 15
fall = 1
fall.recover = 0
kill = 1
guard.kill = 1
fall.kill = 1
numhits = 1
id = 7210
chainID = -1
nochainID = -1
hitonce = 0
kill = 1
guard.kill = 1
fall.kill = 1
numhits = 1

[State 7202, 6]
type = Null
triggerall = NumTarget && MoveHit && HitPauseTime = 1 && HitCount = 1
trigger1 = root,Cond(FVar(20) > .3, FVar(20) := FVar(20) - .2,0) || root,Cond(FVar(21) > .3, FVar(21) := FVar(21) - .2,0)
ignorehitpause = 1
persistent = 0

[State 7202, 7]
type = ChangeState
trigger1 = MoveContact || FrontEdgeDist < -30
value = 7015

[State 7202, 7]
type = Null
trigger1 = FrontEdgeDist < -30
value = 7015
;---------------------------------------------------------------------------
;Knife Hit
[Statedef 7203]
type    = S
movetype= I
physics = N
velset = 0,0
ctrl = 0
anim = 1
sprpriority = 3

[State 0, DestroySelf]
type = DestroySelf
trigger1 = Time = 1
;---------------------------------------------------------------------------
;Challenger Stand Summon (Entrance)
[Statedef 7210]
type    = S
movetype= I
physics = N
velset = ifelse(parent,FrontEdgeDist > 30,(ParentDist X + 20)/15,(ParentDist X)/15),-3.33*const(size.yscale)
ctrl = 0
anim = 7200
sprpriority = 3

[State 7210, 1]
type = ScreenBound
trigger1 = 1
value = 0

[State 7210, 2]
type = PlayerPush
trigger1 = 1
value = 0

[State 7210, 3]
type = Null
trigger1 = !Time
var(7) = -50-(50*(root,Var(0) > 0))

[State 7210, 4]
type = ParentVarSet
trigger1 = !Time && RoundState = 2
var(38) = 1

[State 7210, 5]
type = HitOverride
trigger1 = 1
attr = SCA,NA,SA,HA,NP,SP,HP
stateno = 7230
time = -1

[State 7210, 6]
type = HitBy
trigger1 = 1
value = SCA,NA,SA,HA,NP,SP,HP
time = -1

[State 7210, 7]
type = VelAdd
trigger1 = 1
y = .44*const(size.yscale)

[State 7210, 8]
type = PlaySnd
trigger1 = !Time
value = S7200,0

[State 7210, 9]
type = VarSet
trigger1 = 1
fvar(1) = P2BodyDist X 

[State 7210, 10]
type = VarSet
trigger1 = 1
fvar(2) = P2BodyDist Y 

[State 7210, 11]
type = ChangeState
trigger1 = Vel Y > 0 && Pos Y > -Vel Y
value = 7211
;---------------------------------------------------------------------------
;Challenger Stand Summon (Knife Toss)
[Statedef 7211]
type    = S
movetype= A
physics = S
velset = 0,0
ctrl = 0
anim = 7211
sprpriority = 3

[State 7211, 1]
type = ScreenBound
trigger1 = 1
value = 0

[State 7211, 2]
type = PlayerPush
trigger1 = 1
value = 0

[State 7211, 3]
type = HitOverride
trigger1 = 1
attr = SCA,NA,SA,HA,NP,SP,HP
stateno = 7230
time = -1

[State 7211, 4]
type = HitBy
trigger1 = 1
value = SCA,NA,SA,HA,NP,SP,HP
time = -1

[State 7211, 5]
type = HitDef
trigger1 = !Time
attr = S,SA
hitflag = MAF
guardflag = MA
animtype = Medium
priority = 4,Hit
damage = ceil(125*root,Fvar(21)),15
pausetime = 12,12
sparkno = S6001
guard.sparkno = -1
sparkxy = -9,ceil(-13*const(size.xscale))
hitsound = F5,4
guardsound = F6,0
ground.type = Low
ground.slidetime = 21
ground.hittime = 23
guard.hittime = 14
guard.slidetime = 11
id = 1050
chainID = -1
nochainID = -1
hitonce = 0
kill = 1
guard.kill = 1
fall.kill = 1
numhits = 1

[State 7211, 6]
type = Null
triggerall = NumTarget && MoveHit
trigger1 = root,Cond(FVar(20) > .3, FVar(20) := FVar(20) - .2,0) || root,Cond(FVar(21) > .3, FVar(21) := FVar(21) - .2,0)
ignorehitpause = 1
persistent = 0

[State 7211, 7]
type = PosSet
trigger1 = !Time
y = 0

[State 7211, 8]
type = VelSet
trigger1 = AnimElem = 17
x = 5.3*const(size.xscale)

[State 7211, 9]
type = PlaySnd
trigger1 = !Time
value = S7210,0

[State 7211, 10]
type = TargetState
trigger1 = NumTarget && MoveHit && HitPauseTime = 1
value = 7212
ignorehitpause = 1

[State 7211, 11]
type = Explod
triggerall = NumTarget
trigger1 = target,StateNo = 7213 && target,Time = 1
anim = 6001 
ID = 3001
pos = 0,-32
postype = p2
facing = -1
vfacing = 1
bindtime = 1
removetime = -2
pausemovetime = 0
scale = 1,1
sprpriority = 3
ownpal = 1
removeongethit = 0

[State 7211, 12]
type = VarSet
trigger1 = 1
fvar(1) = P2BodyDist X 

[State 7211, 13]
type = VarSet
trigger1 = 1
fvar(2) = P2BodyDist Y 

[State 7211, 14]
type = PlaySnd
triggerall = NumTarget
trigger1 = target,StateNo = 7213 && target,Time = 1
value = F5,3
ignorehitpause = 1

[State 7211, 15]
type = PlaySnd
triggerall = NumTarget
trigger1 = target,StateNo = 7213 && target,Time = 1
value = F7,2
ignorehitpause = 1

[State 7211, 16]
type = PlaySnd
trigger1 = AnimElem = 18
value = F0,4

[State 7211, 17]
type = ChangeState
trigger1 = !AnimTime
value = 7220
ctrl = 0
;---------------------------------------------------------------------------
;Hit By Sword
[Statedef 7212]
type    = A
movetype= H
physics = N
velset = -11.3,-5.8
ctrl = 0
sprpriority = -2

[State 7212, 1]
type = ChangeAnim2
trigger1 =  !Time
value = 5030

[State 7212, 2]
type = ScreenBound
trigger1 = 1 
value = 0

[State 7212, 3]
type = VelAdd
trigger1 = 1
y = .35*const(size.yscale)

[State 7212, 4]
type = ChangeState
trigger1 = BackEdgeBodyDist <= 8
value = 7213

[State 7212, 5]
type = SelfState
trigger1 = Vel Y > 0 && Pos Y > -Vel Y
value = 5110
;---------------------------------------------------------------------------
;Wall Bounce
[Statedef 7213]
type    = A
movetype= H
physics = N
velset = 0,0
ctrl = 0
sprpriority = -2

[State 7213, 1]
type = ScreenBound
trigger1 = AnimElemTime(14) < 0
value = 0

[State 7213, 2]
type = ScreenBound
trigger1 = AnimElem = 14
value = 1

[State 7213, 3]
type = ChangeAnim2
trigger1 = !Time
value = 7213

[State 7213, 4]
type = EnvShake
trigger1 = !Time
time = 5
freq = 60
ampl = -4

[State 7213, 5]
type = ChangeAnim2
trigger1 = !Time
value = 7213

[State 7213, 6]
type = ChangeAnim
trigger1 = Anim = 7213 && !AnimTime
value = 5050

[State 7213, 7]
type = VelSet
trigger1 = Anim = 7213 && Time = 21
x = 1.1
y = -8.9

[State 1116, 8]
type = VelAdd
trigger1 = (Anim = 7213 && Time >= 21) || Anim = 5050
y = .35

[State 1116, 9]
type = SelfState
trigger1 = Vel Y > 0 && Pos Y >= -Vel Y
value = 5100

;---------------------------------------------------------------------------
;Challenger Leave
[Statedef 7220]
type    = A
movetype= I
physics = N
velset = -10*const(size.xscale), -9.13*const(size.yscale)
ctrl = 0
anim = 7220
sprpriority = 3

[State 7220, 1]
type = ScreenBound
trigger1 = 1
value = 0

[State 7220, 2]
type = PlayerPush
trigger1 = 1
value = 0

[State 7220, 3]
type = VelAdd
trigger1 = 1
y = .44*const(size.yscale)

[State 7220, 4]
type = PlaySnd
trigger1 = !Time 
value = S7200,0

[State 7220, 5]
type = ChangeState
trigger1 = BackEdgeDist < -30
value = 7300
;---------------------------------------------------------------------------
; HITA_UP (initial going up)
[Statedef 7230]
type    = U
movetype= H
physics = N
velset = 0,0
ctrl = 0
anim = 7230
sprpriority = 3

[State 7230, 1]
type = ScreenBound
trigger1 = 1
value = 0

[State 7230, 2]
type = PlayerPush
trigger1 = 1
value = 0

[State 7230, 3]
type = ParentVarAdd
trigger1 = !Time 
var(6) = -100
ignorehitpause = 1

[State 7230, 4]
type = PlaySnd
trigger1 = !Time
value = S7230,0

[State 7230, 5]
type = ChangeState
trigger1 = !AnimTime
value = 7231 + 1*(StateType != A)

[State 7230, 6]
type = ChangeState
trigger1 = root,Var(6) = 0
value = 7240
;---------------------------------------------------------------------------
; HITA_UP (initial going up)
[Statedef 7231]
type    = A
movetype= H
physics = N
velset = 0,0
ctrl = 0
anim = 7200
sprpriority = 3

[State 7231, 1]
type = ScreenBound
trigger1 = 1
value = 0

[State 7231, 2]
type = PlayerPush
trigger1 = 1
value = 0

[State 7231, 3]
type = NotHitBy
trigger1 = 1
value = SCA,AA,AP,AT
time = 1

[State 7231, 4]
type = VelAdd
trigger1 = 1
y = .44*const(size.yscale)

[State 7231, 5]
type = ChangeState
trigger1 = Vel Y > 0 && Pos Y > -Vel Y
value = 7232
;---------------------------------------------------------------------------
; HITA_UP (initial going up)
[Statedef 7232]
type    = S
movetype= H
physics = N
velset = 0,0
ctrl = 0
anim = 7232
sprpriority = 3

[State 7231, 1]
type = ScreenBound
trigger1 = 1
value = 0

[State 7231, 2]
type = PlayerPush
trigger1 = 1
value = 0

[State 7231, 5]
type = ChangeState
trigger1 = !AnimTime
value = 7220
;---------------------------------------------------------------------------
;Challenger Defeated
[Statedef 7240]
type    = L
movetype= H
physics = N
velset = 0,-3.5
ctrl = 0
anim = 7240
sprpriority = 3

[State 7240, 1]
type = VelAdd
trigger1 = Vel Y <= 0
y = .15*const(size.yscale)

[State 7240, 2]
type = VelAdd
trigger1 = Time >= 40
y = .55*const(size.yscale)

[State 7240, 3]
type = PlaySnd
trigger1 = !Time
value = S7240,0

[State 7240, 4]
type = DestroySelf
trigger1 = ScreenPos Y >= 400
;---------------------------------------------------------------------------
;Helper Gone
[Statedef 7300]
type    = U
movetype= H
physics = N
ctrl = 0
anim = 1
velset = 0,0
sprpriority = 3

[State 7300, 1]
type = ParentVarSet
trigger1 = Var(10) >= Var(11)
var(39) = 0
ignorehitpause = 1

[State 7300, 2]
type = ParentVarSet
trigger1 = !Time
var(38) = 0
ignorehitpause = 1

[State 7300, 3]
type = DestroySelf
triggerall = !(root,Var(38)) && !(root,Var(39))
trigger1 = !NumTarget && Anim = 1
trigger2 = NumTarget && Anim = 1
trigger2 = target,StateType = L